package edu.ucsur.tp.dao;

import java.io.InputStream;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

public class JpaDAOFactory extends DAOFactory {

  private EntityManagerFactory emf = null;
  
  public JpaDAOFactory() {
    try {
      emf = Persistence.createEntityManagerFactory("VeterinariaLasMascotas-DatosPU");
    } catch (Exception ex) {
      ex.printStackTrace();
    }
  }
  
  @Override
  public UsuarioDAO getUsuario() {
    return new JpaUsuarioDAO(emf);
  }

}
